#pragma once

#include <string_view>
#include <ostream>


namespace html
{

class Escape
{
public:
    Escape(const std::string_view &str)
        : str_(str) {
    }

private:
    void escape(std::ostream &out) const;

private:
    const std::string_view &str_;

    friend std::ostream &operator<<(std::ostream &out, const Escape &obj) {
        obj.escape(out);
        return out;
    }
};

} // namespace html
